package com.Ajava1704.for设计模式.for单例模式;

import java.util.concurrent.Callable;
import java.util.concurrent.CountDownLatch;

/**
 * @类名: com.Ajava1704.for设计模式.for单例模式
 * @作者: lgt
 * @创建时间: 2020-02-15 16:45
 * @描述:
 **/
public class MyCallable implements Callable<ForDanLiObject> {

    private CountDownLatch countDownLatch;

    public MyCallable(CountDownLatch countDownLatch) {
        this.countDownLatch = countDownLatch;
    }

    @Override
    public ForDanLiObject call() throws Exception {
        ForDanLiObject singaloObject = ForDanLiMeiJv.SINGAL.getSingaloObject();
        countDownLatch.countDown();
        return singaloObject;
    }
}
